3.1.27 \(\int \frac {(a+b \log (c x^n)) \log (d (\frac {1}{d}+f x^2))}{x^3} \, dx\) [27]

Optimal. Leaf size=141 \[ \frac {1}{2} b d f n \log (x)-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d f n \log \left (1+d f x^2\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right ) \]

[Out]

1/2*b*d*f*n*ln(x)-1/2*b*d*f*n*ln(x)^2+d*f*ln(x)*(a+b*ln(c*x^n))-1/4*b*d*f*n*ln(d*f*x^2+1)-1/4*b*n*ln(d*f*x^2+1
)/x^2-1/2*d*f*(a+b*ln(c*x^n))*ln(d*f*x^2+1)-1/2*(a+b*ln(c*x^n))*ln(d*f*x^2+1)/x^2-1/4*b*d*f*n*polylog(2,-d*f*x
^2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2504, 2442, 36, 29, 31, 2423, 2338, 2438} \begin {gather*} -\frac {1}{4} b d f n \text {PolyLog}\left (2,-d f x^2\right )+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {1}{4} b d f n \log \left (d f x^2+1\right )-\frac {b n \log \left (d f x^2+1\right )}{4 x^2}-\frac {1}{2} b d f n \log ^2(x)+\frac {1}{2} b d f n \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

(b*d*f*n*Log[x])/2 - (b*d*f*n*Log[x]^2)/2 + d*f*Log[x]*(a + b*Log[c*x^n]) - (b*d*f*n*Log[1 + d*f*x^2])/4 - (b*
n*Log[1 + d*f*x^2])/(4*x^2) - (d*f*(a + b*Log[c*x^n])*Log[1 + d*f*x^2])/2 - ((a + b*Log[c*x^n])*Log[1 + d*f*x^
2])/(2*x^2) - (b*d*f*n*PolyLog[2, -(d*f*x^2)])/4

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2423

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^3} \, dx &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-(b n) \int \left (\frac {d f \log (x)}{x}-\frac {\log \left (1+d f x^2\right )}{2 x^3}-\frac {d f \log \left (1+d f x^2\right )}{2 x}\right ) \, dx\\ &=d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}+\frac {1}{2} (b n) \int \frac {\log \left (1+d f x^2\right )}{x^3} \, dx+\frac {1}{2} (b d f n) \int \frac {\log \left (1+d f x^2\right )}{x} \, dx-(b d f n) \int \frac {\log (x)}{x} \, dx\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b n) \text {Subst}\left (\int \frac {\log (1+d f x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b d f n) \text {Subst}\left (\int \frac {1}{x (1+d f x)} \, dx,x,x^2\right )\\ &=-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )+\frac {1}{4} (b d f n) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{4} \left (b d^2 f^2 n\right ) \text {Subst}\left (\int \frac {1}{1+d f x} \, dx,x,x^2\right )\\ &=\frac {1}{2} b d f n \log (x)-\frac {1}{2} b d f n \log ^2(x)+d f \log (x) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b d f n \log \left (1+d f x^2\right )-\frac {b n \log \left (1+d f x^2\right )}{4 x^2}-\frac {1}{2} d f \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f n \text {Li}_2\left (-d f x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.07, size = 241, normalized size = 1.71 \begin {gather*} a d f \log (x)+\frac {1}{2} b d f \log (x) \left (n+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right )-\frac {1}{2} a d f \log \left (1+d f x^2\right )-\frac {a \log \left (1+d f x^2\right )}{2 x^2}-\frac {1}{4} b d f \left (n+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )-\frac {b \left (n+2 n \log (x)+2 \left (-n \log (x)+\log \left (c x^n\right )\right )\right ) \log \left (1+d f x^2\right )}{4 x^2}+b d f n \left (\frac {\log ^2(x)}{2}+\frac {1}{2} \left (-\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )-\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )+\frac {1}{2} \left (-\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )-\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

a*d*f*Log[x] + (b*d*f*Log[x]*(n + 2*(-(n*Log[x]) + Log[c*x^n])))/2 - (a*d*f*Log[1 + d*f*x^2])/2 - (a*Log[1 + d
*f*x^2])/(2*x^2) - (b*d*f*(n + 2*(-(n*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/4 - (b*(n + 2*n*Log[x] + 2*(-(n
*Log[x]) + Log[c*x^n]))*Log[1 + d*f*x^2])/(4*x^2) + b*d*f*n*(Log[x]^2/2 + (-(Log[x]*Log[1 + I*Sqrt[d]*Sqrt[f]*
x]) - PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/2 + (-(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x]) - PolyLog[2, I*Sqrt[d]*S
qrt[f]*x])/2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.09, size = 619, normalized size = 4.39

method result size
risch \(-\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i f d \ln \left (x \right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}-\frac {f d b n \dilog \left (1-x \sqrt {-d f}\right )}{2}-\frac {a \ln \left (d f \,x^{2}+1\right )}{2 x^{2}}+a d f \ln \left (x \right )-\frac {a d f \ln \left (d f \,x^{2}+1\right )}{2}+\frac {n b \ln \left (x \right ) \ln \left (d f \,x^{2}+1\right ) d f}{2}+\left (-\frac {b \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{2 x^{2}}+b f d \ln \left (x \right )-\frac {b f d \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{2}\right ) \ln \left (x^{n}\right )-\frac {b \ln \left (c \right ) \ln \left (d f \,x^{2}+1\right )}{2 x^{2}}-\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}+\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4}-\frac {i f d \ln \left (x \right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}-\frac {f d b n \dilog \left (1+x \sqrt {-d f}\right )}{2}-\frac {f d \ln \left (d f \,x^{2}+1\right ) \ln \left (c \right ) b}{2}+f d \ln \left (x \right ) \ln \left (c \right ) b -\frac {b n \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}+\frac {i f d \ln \left (d f \,x^{2}+1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4}-\frac {f d b n \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )}{2}-\frac {f d b n \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )}{2}+\frac {b d f n \ln \left (x \right )}{2}-\frac {b d f n \ln \left (x \right )^{2}}{2}-\frac {b d f n \ln \left (d f \,x^{2}+1\right )}{4}+\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (d f \,x^{2}+1\right )}{4 x^{2}}\) \(619\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(1/d+f*x^2))/x^3,x,method=_RETURNVERBOSE)

[Out]

1/2*I*f*d*ln(x)*P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ln(d*f*x^2+1)-1/2*I*f*d*ln(x)*Pi*b*csgn(I*c)*csg
n(I*x^n)*csgn(I*c*x^n)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="maxima")

[Out]

-1/4*(b*(n + 2*log(c)) + 2*b*log(x^n) + 2*a)*log(d*f*x^2 + 1)/x^2 + integrate(1/2*(2*b*d*f*log(x^n) + 2*a*d*f
+ (d*f*n + 2*d*f*log(c))*b)/(d*f*x^3 + x), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="fricas")

[Out]

integral((b*log(d*f*x^2 + 1)*log(c*x^n) + a*log(d*f*x^2 + 1))/x^3, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(1/d+f*x**2))/x**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(1/d+f*x^2))/x^3,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x^2 + 1/d)*d)/x^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^3,x)

[Out]

int((log(d*(f*x^2 + 1/d))*(a + b*log(c*x^n)))/x^3, x)

________________________________________________________________________________________